<script type="text/javascript"><!--//--><![CDATA[//><!--

    $(document).ready(function() {
        // Setup Form
		$('#form_master').setupForm([
            { name: 'kode_tender', type: 'text', size: 'medium', maxlength: 10, noempty:true },
			{ name: 'nama_tender', type: 'text', size: 'long', maxlength: 100, noempty:true },
			{ name: 'tgl', type: 'date' },
			{ name: 'app_id', type: 'text', size: 'medium', data: <?php echo json_encode($arr_application); ?>},
			{ name: 'kode_penawaran', type: 'text', size: 'long', maxlength: 100},
			{ name: 'keterangan', type: 'text', size: 'long', maxlength: 100}
        	], <?php echo json_encode($data); ?>);
        
		
        <?php if($mode=="edit"){ ?>
        $('#kode_tender').readonly();
        <?php } ?>		
		// Set Action Button
		var buttons = [{ label: 'Save', icon: 'save', onclick: function() { 
							$('#form_master').submitForm('/'+controller+'/ajax_post', 
															{onComplete : function(){ loadPage('/'+controller+'/Index');}} 
														); 
						}},
					   { label: 'Close', icon: 'cancel', onclick: function() { loadPage('/'+controller+'/Index'); } }];
		setAction(buttons);
		
		// Create Tab
		$('#tt').tabs({ border:false });  
		
		// Focus at First Object
		$('#form_master').focusFirst();
    });
//--><!]]></script>

<div id="form_master_message" style="display:none;"></div>

<table class="tb_form" style="display:none;" cellpadding="0" cellspacing="0">
<tr>
    <td class="label">Kode Tender</td>
    <td><input id="kode_tender" /></td>
    <td class="label">Kode Penawaran</td>
    <td><input id="kode_penawaran" /></td>
</tr>
<tr>
    <td class="label">Nama Tender</td>
    <td><input id="nama_tender" /></td>
    <td class="label">Tgl</td>
    <td><input id="tgl" /></td>
</tr>
<tr>
    <td class="label">Application</td>
    <td><input id="app_id" /></td>
    <td class="label">Keterangan</td>
    <td><input id="keterangan" /></td>    
</tr>

</table>

<div id="tt" class="easyui-tabs" style="min-height:300px;">  
	<div title="Detail Penawaran" style="overflow:auto;padding:10px;">  
    	<?php //require_once('form_detail.php'); ?>
    </div>    
</div>